﻿@inherits Microsoft.VisualStudio.Web.CodeGeneration.Templating.RazorTemplateBase
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

@{string modelName = (Model.ClassName.EndsWith("Controller") ? Model.ClassName.Substring(0, Model.ClassName.Length - 10) : Model.ClassName);}
namespace @Model.NamespaceName
{
    [Route("api/[controller]")]
    [ApiController]
    public class @Model.ClassName : ControllerBase
    {
        // GET: api/@modelName
        [HttpGet]
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET: api/@modelName/5
        [HttpGet("{id}", Name = "Get")]
        public string Get(int id)
        {
            return "value";
        }

        // POST: api/@modelName
        [HttpPost]
        public void Post([FromBody] string value)
        {
        }

        // PUT: api/@modelName/5
        [HttpPut("{id}")]
        public void Put(int id, [FromBody] string value)
        {
        }

        // DELETE: api/@modelName/5
        [HttpDelete("{id}")]
        public void Delete(int id)
        {
        }
    }
}
